package java69.work721;

public class Circle extends Base {

    private double radius;
    public Circle() {
    }

    public Circle(double radius) {
        this.radius = radius;
    }

    public double getRadius() {
        return radius;
    }

    public void setRadius(double radius) {
        this.radius = radius;
    }

    @Override
    public void area( ) {
       double areas = this.radius*this.radius*Math.PI;
        System.out.println("面积为"+areas);
    }

    @Override
    public void perimeter() {
        double perimeter = 2*this.radius*Math.PI;
        System.out.println("周长为"+perimeter);
    }
}
